
#ifndef CS240_HTML_PARSER_H
#define CS240_HTML_PARSER_H

#include "HTMLTokenizer.h"
#include <string>

class HTMLParser {

   public:
      //! Default constructor with a string url
      //! @param url the url to be downloaded and parsed
      HTMLParser(std::string url);

      //! The only deconstructor actually necessary in my code
      ~HTMLParser();

      //! The main parsing method which decides how to parse the Token input
      void parse();

      //! @param token the token to be checked if it is a tag containing "script"
      //! sets the script flag to true or false based upon the tag type

      HTMLToken IsBoard(HTMLToken & token);

      HTMLToken IsHistory(HTMLToken & token);

   private:
      URLInputStream * UIStream; // InputStream used to initialize the tokenizer
      HTMLTokenizer * tokenizer; // Tokenizer used to get the tokens

      bool board;
      bool history;
};

#endif